/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dotexe.webframework.core.clientactions;

import org.json.JSONException;
import org.json.JSONObject;

/**
 *
 * @author jovan.tomasevic
 */
/// <summary>
/// Base class for all client action configuration
/// </summary>
public abstract class ClientActionConfiguration extends JSONObject {

    public String getType() throws JSONException{
        return this.getString("Type");
    }
    public void setType(String value) throws JSONException{
        if(value == null){
            this.put("Type", JSONObject.NULL);
        }
        else{
            this.put("Type", value);
        }
    }
  
    public Boolean getExecuteAfterDataBinding() throws JSONException{
        return this.getBoolean("ExecuteAfterDataBinding");
    }
    public void setExecuteAfterDataBinding(Boolean value) throws JSONException{
        if(value == null){
            this.put("ExecuteAfterDataBinding", JSONObject.NULL);
        }
        else{
            this.put("ExecuteAfterDataBinding", value);
        }
    }



    public int getDelay() throws JSONException{
        return this.getInt("Delay");
    }
    public void setDelay(int value) throws JSONException{
         this.put("Delay", value);
    }

    public String getOwnerID() throws JSONException{
        return this.getString("OwnerID");
    }
    public void setOwnerID(String value) throws JSONException{
        if(value == null){
            this.put("OwnerID", JSONObject.NULL);
        }
        else{
            this.put("OwnerID", value);
        }
    }

    public ClientActionConfiguration() throws JSONException{

        this.put("Type", JSONObject.NULL);
        this.put("ExecuteAfterDataBinding",false);
        this.put("Delay",JSONObject.NULL);
        this.put("OwnerID",JSONObject.NULL);

    }

}
